package com.example.gun;

import java.io.IOException;

import android.app.Activity;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.media.SoundPool;
import android.util.Log;

public class MediaPlay {
	private SoundPool mSoundPool = new SoundPool(20,AudioManager.STREAM_MUSIC,100);  
	private float _leftVolume, _rightVolume;
	private int b14ChangeSound;
	private int playB14ShootSound;
	private int playMusicShootAGunSound;
	
	private float leftVolume=1 ,rightVolume=1;
	public MediaPlay(Activity activity){
		b14ChangeSound = mSoundPool.load(activity, R.raw.shayinghuanzidan,1);
		playB14ShootSound = mSoundPool.load(activity,R.raw.shayingshoot,1);
		playMusicShootAGunSound = mSoundPool.load(activity, R.raw.shootagun,1);
	}
	public void playB14Change(Activity activity) {
		mSoundPool.play(b14ChangeSound	, leftVolume, rightVolume, 1, 0,1);
	}

	public void playB14Shoot(Activity activity) {
		mSoundPool.play(playB14ShootSound	,  leftVolume, rightVolume, 1, 0,1);
	}


	public void playMusicShootAGun(Activity activity) {
		mSoundPool.play(playMusicShootAGunSound	, leftVolume, rightVolume, 1, 0,1);
	}


}
